package com.manlost.upload.operate;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * 类SynchronizedFolderOp.java的实现描述：TODO 类实现描述
 * 
 * @author xiaochuan.luxc 2012-5-6 上午10:45:14
 */
public class AblumFolderOp {

    private Set<String> dirNames = new HashSet<String>();

    public AblumFolderOp(File file) {
        generateDirectoryNames(file);
    }

    private void generateDirectoryNames(File file) {
        if (file.exists()) {
            if (file.isDirectory()) {
                for (File f : file.listFiles()) {
                    generateDirectoryNames(f);
                }
            } else {
                dirNames.add(file.getParent());
            }
        }
    }

    /**
     * @return the dirNames
     */
    public Set<String> getDirNames() {
        return dirNames;
    }

}
